﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirstBroadcast.aspx.cs" Inherits="HQWeb.SysManage.FirstBroadcast.FirstBroadcast" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/GridViewStyle.css" rel="Stylesheet" type="text/css" />
    <link href="../../Styles/Site.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function AddFile(objname,objid) {
            var rtnValue, url, title, feature; 
            var url = "../../Resources/BroadcastFile.aspx";
            var feature = "dialogWidth:600px;dialogHeight:650px;center:yes;help:no;resizable:yes;status:no;scroll:no";
            var varReturn = window.showModalDialog(url, '', feature);
            userAgent = window.navigator.userAgent.toLowerCase();
            var name = navigator.appName;
            if (name != "Microsoft Internet Explorer") {
                if (!varReturn) {
                    varReturn = window.ReturnValue;
                }
            } 
            //varReturn = window.ReturnValue;
            document.getElementById(objname).value = varReturn.name;
            document.getElementById(objid).value = varReturn.id;
        }

        function ClearFile(objname, objid) {
            document.getElementById(objname).value = "";
            document.getElementById(objid).value = "";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">  
<%--    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>  --%>
    <div>
          <table width="98%">
            <tr>
                <td colspan="4" class="title">
                    <asp:Label runat="server" ID="labTitle" Text="初始化播放视频"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 20%">
                    店 名：
                </td>
                <td colspan="3">
                    <%--<asp:TextBox runat="server" ID="txtName"></asp:TextBox>--%>
                    <asp:DropDownList runat="server" Width="158px" ID="drop_branch" AutoPostBack="true" 
                        onselectedindexchanged="drop_branch_SelectedIndexChanged"></asp:DropDownList>
                </td>
               <%-- <td align="right">
                    地 址 ：
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtAddress" Width="80%"></asp:TextBox><span style="color: Red">*</span>
                </td>--%>
            </tr>
            <tr>
                <td align="right" style="width: 20%">
                    喜来展示：
                </td>
                <td style="width: 30%">
                   <%-- <asp:TextBox runat="server" ID="txtShow"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textShow" /><input type="button" id="btn_show" value="选 择" onclick="AddFile('textShow','show')" />&nbsp;<input type="button" id="clear_show" value="清 除" onclick="ClearFile('textShow','show')" /><input type="text" runat="server" id="show" style="display:none;"/><input type="text" runat="server" id="show_id" style="display:none;"/>
                </td>
                <td style="width: 20%" align="right">
                    新人学堂：
                </td>
                <td>
                    <%--<asp:TextBox runat="server" ID="txtNewSchool"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textNewSchool" />&nbsp;<input type="button" id="btn_new" value="选 择" onclick="AddFile('textNewSchool','newSchool')" />&nbsp;<input type="button" id="clear_new" value="清 除" onclick="ClearFile('textNewSchool','newSchool')" /><input type="text" runat="server" id="newSchool" style="display:none;"/><input type="text" runat="server" id="newSchool_id" style="display:none;"/>
                </td>
            </tr>
            <tr>
                <td style="width: 20%" align="right">
                    婚礼定制:
                </td>
                <td>
                    <%--<asp:TextBox runat="server" ReadOnly="true" ID="txtMakeWedding"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textMakeWedding" />&nbsp;<input type="button" id="btn_make" value="选 择" onclick="AddFile('textMakeWedding','make')" />&nbsp;<input type="button" id="clear_make" value="清 除" onclick="ClearFile('textMakeWedding','make')" /><input type="text" runat="server" id="make" style="display:none;"/><input type="text" runat="server" id="make_id" style="display:none;"/>
                </td>
                <td style="width: 20%" align="right">
                    主题庆典:
                </td>
                <td>
                    <%--<asp:TextBox runat="server" ReadOnly="true" ID="txtThemeWedding"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textThemeWedding" />&nbsp;<input type="button" id="btn_theme" value="选 择" onclick="AddFile('textThemeWedding','theme')" />&nbsp;<input type="button" id="clear_theme" value="清 除" onclick="ClearFile('textThemeWedding','theme')" /><input type="text" runat="server" id="theme" style="display:none;"/><input type="text" runat="server" id="theme_id" style="display:none;"/>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 20%">
                    酒店展示：
                </td>
                <td style="width: 30%">
                    <%--<asp:TextBox runat="server" ReadOnly="true" ID="txtHotel"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textHotel" />&nbsp;<input type="button" id="btn_hotel" value="选 择" onclick="AddFile('textHotel','hotel')" />&nbsp;<input type="button" id="clear_hotel" value="清 除" onclick="ClearFile('textHotel','hotel')" /><input type="text" runat="server" id="hotel" style="display:none;"/><input type="text" runat="server" id="hotel_id" style="display:none;"/>
                </td>
                <td style="width: 20%" align="right">
                    我的喜来:
                </td>
                <td>
                   <%-- <asp:TextBox runat="server" ReadOnly="true" ID="txtMyXilai"></asp:TextBox>--%><input runat="server" readonly="readonly" type="text" id="textMyXilai" />&nbsp;<input type="button" id="btn_xilai" value="选 择" onclick="AddFile('textMyXilai','xilai')" />&nbsp;<input type="button" id="clear_xilai" value="清 除" onclick="ClearFile('textMyXilai','xilai')" /><input type="text" runat="server" id="xilai" style="display:none;"/><input type="text" runat="server" id="xilai_id" style="display:none;"/>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td colspan="3">
                    &nbsp;&nbsp;&nbsp; &nbsp;<asp:Button ID="btnSubmit" runat="server" Text="编 辑" CommandName="add"
                        OnClick="btnSubmit_Click" />&nbsp; &nbsp;
                    <asp:Button ID="btnCancle" runat="server" Text="取 消" OnClick="btnCancle_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="4" align="center">
                    <br />
                    <asp:GridView ID="GridView1" CssClass="GridViewStyle" runat="server" AutoGenerateColumns="False" PageSize="10"
                        Width="100%" AllowPaging="True" CellPadding="4" EmptyDataText="没有数据记录！！" OnPageIndexChanging="GridView1_PageIndexChanging"
                        GridLines="None" DataKeyNames="BRANCH_ID" OnRowEditing="GridView1_RowEditing">
                        <Columns>
                            <asp:TemplateField HeaderText="序号" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <%#Container.DisplayIndex +1%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="BRANCH_NAME" ReadOnly="true" HeaderText="店名称" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="35%"></ItemStyle>
                            </asp:BoundField>
                          <%--  <asp:BoundField DataField="BRANCH_ID" Visible="false" HeaderText="店名称" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Center">
                            </asp:BoundField>--%>
                            <asp:TemplateField HeaderText="模 块" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <a>
                                        <%#getModule(Eval("MODULE").ToString())%>
                                    </a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="FILE_TITEL" ReadOnly="true" HeaderText="视频名称" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Center">
                                <ItemStyle Width="20%"></ItemStyle>
                            </asp:BoundField>
                             <%--<asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnEdit" runat="server" Text="编 辑" CommandName="Edit" CommandArgument='<%#Eval("BRANCH_ID")%>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>--%>                          
                        </Columns>
                        <PagerTemplate>
                            <table width="100%">
                                <tr>
                                    <td style="text-align: center">
                                        第<asp:Label ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />页
                                        共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' />页
                                        <asp:LinkButton ID="btnFirst" runat="server" CausesValidation="False" CommandArgument="First"
                                            CommandName="Page" Text="首页" />
                                        <asp:LinkButton ID="btnPrev" runat="server" CausesValidation="False" CommandArgument="Prev"
                                            CommandName="Page" Text="上一页" />
                                        <asp:LinkButton ID="btnNext" runat="server" CausesValidation="False" CommandArgument="Next"
                                            CommandName="Page" Text="下一页" />
                                        <asp:LinkButton ID="btnLast" runat="server" CausesValidation="False" CommandArgument="Last"
                                            CommandName="Page" Text="尾页" />
                                        <asp:TextBox ID="txtNewPageIndex" runat="server" Width="28px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />
                                        <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                            CommandName="Page" Text="GO" /><!-- here set the CommandArgument of the Go Button to '-1' as the flag -->
                                    </td>
                                </tr>
                            </table>
                        </PagerTemplate>
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                        <PagerStyle CssClass="GridViewPagerStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                    </asp:GridView>
                    <br />
                </td>
            </tr>
        </table>
    </div>
<%--    </ContentTemplate>
    </asp:UpdatePanel>--%>
    </form>
</body>
</html>
